package main

import (
	"learn/smart/worker/igxe"
	"learn/smart/config"
	"time"
	"learn/smart/worker/proxy"
)

func main() {
	for key, user := range config.GetIUsers() {
		go func(user config.User, key int) {
			if key == 0 {
				//分开执行 1分钟后执行
				<-time.After(time.Minute)
			}
			w := igxe.Worker{
				User: &user,
			}
			w.Do()
		}(user, key)
	}

	for {
		<-time.Tick(30 * time.Minute)
		proxy.CheckAndRemoveFailed()
	}
}
